package org.example;

import java.util.Locale;
import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User:何人亮
 * Date:2024-10-19
 * 12:28
 */
public class Test {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        String s=sc.nextLine();
        for (int i = 0; i < s.length(); i++) {
            char c=s.charAt(i);
            if(c>='A'&&c<='Z'){
                c=(char)(c+32);
            }else if(c>='a'&&c<='z'){
                c=(char)(c-32);
            }
            System.out.print(c);
        }
    }
}
